<link rel="stylesheet" href="__PUBLIC__/admin/material/css/index.css?v=20221110&times=111" />
<link rel="stylesheet" href="__PUBLIC__/admin/material_media/css/index.css?v=111141&times=111" />
<style>
    .main-box-body .navs .active {
        background: azure;
        color: #03a9f4;
        border: 1px solid #03a9f4;
        border-radius: 5px;
    }
</style>
<header class="main-box-header clearfix">
    <div class="pull-right">
        <button type="button" class="btn btn-warning"> <input class="checkbox check-all" type="checkbox"
                style="display: inline-block;margin-top: -2px;vertical-align: middle;"> 全选 </button>
        <!-- <button type="button" class="btn btn-warning"> <input class="checkbox check-all" type="checkbox" style="display: inline-block;margin-top: -2px;vertical-align: middle;"> 全选 </button> -->
        <button type="button" class="btn btn-primary" id="createUrl">
            <i class="fa fa-plus"></i> 添加素材 <span class="caret"></span>
        </button>
        <button type="button" class="btn btn-primary" id="uploadTEXT" style="display: none;">
            <i class="fa fa-plus"></i> 添加 <span class="caret"></span>
        </button>
        <button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
    </div>
    {include file="book/_pub_search" /}
</header>
<div class="main-box-body clearfix">
    {:widget('admin/Book/book', $book_id)}
    {:widget('admin/Book/cate', $cate_type)}

    <div class="baiduTable">
        <div class="tiktok">
            <div class="row toolTip">
                {empty name="list"}
                <center>暂无数据</center>
                {/empty}
				{volist name="list" id="vo"}
				<div class="col-md-2">
					<div class="panel panel-default">
						<div class="panel-body">
							<i style="font-style: normal;" onclick="editreferral(this)" data-json='{:json_encode($vo)}'>{$vo.title}</i>
							<video src="{$vo.content}" controls poster="{$vo.cover}"></video>
							<input class="ids row-selected" type="checkbox" name="id[]" value="{$vo['id']}">

							<!-- 过稿功能 + 上报公众库 -->
							<div class="setting">
                                
							</div>
						</div>

                       

                        <div class="panel-footer" style="flex-direction: column;padding: 3px 9px;">
							<div style="width: 100%;justify-content: space-between;color: #b1b0b0;">
                                归属: {$userlist[$vo['uid']]??$vo['uid']}
								
							</div>
						</div>

						<div class="panel-footer" style="flex-direction: column;padding: 3px 9px;border-top: initial;">
							<div style="width: 100%;justify-content: space-between;color: #b1b0b0;">
								<span
									style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;word-break: break-all;width: 220px;flex:1" {if $vo['selection_uid'] == 0}onclick="selection({$vo['id']})"{/if}>{if $vo['selection_uid'] == 0}
                                    <i class="fa fa-edit"></i> 未选用{else/} 
                                    <span  style="color:#ff3c00">已选</span> {$userlist[$vo['selection_uid']]??$vo['selection_uid']} 在 {:date("m-d H:i:s",$vo['selection_time'])} &nbsp;  
                                    {/if}
									<!-- ID:{$vo['id']}  -->
								</span>
								
							</div>
						</div>
						<div class="panel-footer" style="border-top: initial;">
							<span> {$userlist[$vo['create_uid']]??$vo['create_uid']} {$vo['show_time']} 创建</span>
							<div>
								<div class="downLoad" onclick="downMedia('{$vo.content}',{$vo.id})">
									<button type="button" class="btn btn-danger btn-sm" target="_blank"
										href="{$vo.content}">
										<i style="color:#fff" class="iconfont icon-xiazai-wenjianxiazai-16"></i>
									</button>
								</div>

							</div>
						</div>
					</div>

				</div>
				{/volist}
            </div>
        </div>
        {$page}
    </div>
</div>




<div class="modal fade" id="create-referral-link-modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">×</span></button>
                <span style="font-size: 20px;"><span id="referralname">添加</span></span>
            </div>
            <div class="modal-body">
                <div data-bind="visible: loading" class="loading-panel" style="display: none;">
                    <i class="fa fa-spin fa-spinner"></i>
                </div>
                <form class="form-horizontal modelform">

                   
                    <input type="hidden" name="cate_type" value="{$cate_type}">
                    <input type="hidden" name="book_id" value="{$book_id}">
                    <input type="hidden" name="id" id="createspreadid">
                   

                    <div class="form-group">
						<label class="control-label col-sm-2">标题</label>
						<div class="col-sm-8">
							<input type="text" class="form-control"  id="video_title"  name="title" value=""  placeholder="多个文件时以英文,分开"/>
						</div>
					</div>

                    <!--头部，相册选择和格式选择-->
					<div class="form-group">
						<label class="control-label col-sm-2">视频</label>
						<input type="hidden" name="content" id="video_content">
						<!-- <input type="hidden" class="layui-input content" name="title" id="video_title"> -->
						<input type="hidden" class="layui-input content" name="cover" id="video_cover">
						<div class="col-lg-9">
							<button type="button" class="btn btn-primary" id="video_btn">上传</button>
							<div class="layui-upload-list" >
								
							</div>
							<table></table>
						</div>
					</div>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" id="createreferral" class="btn btn-primary ">提交</button>
            </div>
        </div>
    </div>
</div>
